#include<bits/stdc++.h>
#define int long long 
using namespace std;

inline int read() {
	int x = 0, f = 0; char ch = getchar();
	while(ch < '0' or ch > '9') f |= (ch == '-'), ch = getchar();
	while(ch >= '0' and ch <= '9') x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
	return f ? -x : x;
}
int __stk[128], __top;
inline void write(int x) {
    if(x < 0) putchar('-'), x = -x;
	do { __stk[++__top] = x % 10, x /= 10; } while(x);
	while (__top) putchar(__stk[__top--] + '0');
}
bool stmer;
int n = 1e9, q = 10, m = 1e5;
string s, t, tmp;
mt19937 g(time(0));
bool edmer;
signed main() {
	// freopen("T.in", "r", stdin);
	freopen("brotherhood.in", "w", stdout);
	// cerr << "[Memory] " << (&stmer - &edmer) / 1024 / 1024 << " MB\n";
	s = "0", t = "1";
    while(t.size() <= 1e5) tmp = t, t = t + s, s = tmp;
    cout << n << " " << q << '\n';
    while(q--) {
        int l = g() % tmp.size(), r = g() % tmp.size();
        if(l > r) swap(l, r);
        for(int i = l; i <= r; i++) putchar(tmp[i]); putchar('\n');
    }
    // cerr << "[Runtime] " << (double) clock() / CLOCKS_PER_SEC << " seconds";
	return 0;
} 